Micron Document
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| SparkN0de-git | SparkN0de |
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Commit 189f5239a05d004733744dfdc95b41c318cf8548


Parents : f9967db
Author : Mark Qvist <bc7291552be7a58f361522990465165c>
Date : 2026-05-06T17:19:16+02:00

Raise explicit IOError for the sloppy vibe-coders who apparently can't figure out that you need to set an outbound propagation node before trying to send a propagated message

Changes

2 files changed, 7 insertions(+), 10 deletions(-)


Diff

diff --git a/LXMF/Handlers.py b/LXMF/Handlers.py
index 871cc56..afcf708 100644
--- a/LXMF/Handlers.py
+++ b/LXMF/Handlers.py
@@ -18,7 +18,7 @@ class LXMFDeliveryAnnounceHandler:
self.lxmrouter.update_stamp_cost(destination_hash, stamp_cost)
except Exception as e:
- RNS.log(f"An error occurred while trying to decode announced stamp cost. The contained exception was: {e}", RNS.LOG_ERROR)
+ RNS.log(f"Could not decode stamp cost from announce data. The contained exception was: {e}", RNS.LOG_DEBUG)
for lxmessage in self.lxmrouter.pending_outbound:
if destination_hash == lxmessage.destination_hash:

diff --git a/LXMF/LXMRouter.py b/LXMF/LXMRouter.py
index c0545ca..4a5dfa9 100644
--- a/LXMF/LXMRouter.py
+++ b/LXMF/LXMRouter.py
@@ -97,7 +97,6 @@ class LXMRouter:
self.pending_inbound = []
self.pending_outbound = []
- self.failed_outbound = []
self.direct_links = {}
self.backchannel_links = {}
self.delivery_destinations = {}
@@ -1645,6 +1644,10 @@ class LXMRouter:
def handle_outbound(self, lxmessage):
destination_hash = lxmessage.get_destination().hash
+ if lxmessage.desired_method == LXMessage.PROPAGATED and not self.outbound_propagation_node:
+ self.fail_message(lxmessage)
+ raise IOError("Attempt to send propagated message with no outbound propagation node configured")
+
if lxmessage.stamp_cost == None:
if destination_hash in self.outbound_stamp_costs:
stamp_cost = self.outbound_stamp_costs[destination_hash][1]
@@ -2393,14 +2396,8 @@ class LXMRouter:
RNS.log(str(lxmessage)+" failed to send", RNS.LOG_DEBUG)
lxmessage.progress = 0.0
- if lxmessage in self.pending_outbound:
- self.pending_outbound.remove(lxmessage)
-
- self.failed_outbound.append(lxmessage)
-
- if lxmessage.state != LXMessage.REJECTED:
- lxmessage.state = LXMessage.FAILED
-
+ if lxmessage in self.pending_outbound: self.pending_outbound.remove(lxmessage)
+ if lxmessage.state != LXMessage.REJECTED: lxmessage.state = LXMessage.FAILED
if lxmessage.failed_callback != None and callable(lxmessage.failed_callback):
lxmessage.failed_callback(lxmessage)


──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────